package storage

import (
	"spam3uk/internal/models"
)

// VehicleStorage 车辆数据存储接口
type VehicleStorage interface {
	// 车辆基本信息操作
	GetAllCars(filter *models.VehicleFilter) ([]models.VehicleInfo, int64, error)
	GetByID(id uint) (*models.VehicleInfo, error)
	Create(vehicle *models.VehicleInfo) error
	Update(id uint, vehicle *models.VehicleInfo) error
	Delete(id uint) error
	GetByType(vehicleType string) ([]models.VehicleInfo, error)
	GetByCategory(category string) ([]models.VehicleInfo, error)
	GetCategoryStats() (map[string]int64, error)
	UpsertVehicle(vehicle *models.VehicleInfo) error
	
	// 车辆详情URL操作
	GetVehicleDetailURL(modelName string) (string, error)
	
	// Trim相关操作
	GetTrimsWithSpecs(modelName string) ([]models.TrimWithSpecs, error)
	UpsertTrimInfo(trim *models.TrimInfo) error
	UpsertTrimWithJSONSpecs(trim *models.TrimInfo, specs []models.TrimSpecsInfo) error
	BatchUpsertTrimSpecs(specs []models.TrimSpecsInfo) error
	DeleteTrimByModel(modelName string) error
}
